package <%= config.basePackage %>mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
<% if(config.page === 'mybatisPage') {%>
import com.baomidou.mybatisplus.core.metadata.IPage;
<%}%>
import org.apache.ibatis.annotations.Param;
import <%= config.basePackage %>entity.<%= table.className %>;
import <%= config.basePackage %>service.<%= table.className %>Service;


import java.util.List;


/**
* @author <%= config.author %>
* @date  <%= config.date %>
* @description <%= table.tableName %>Mapper
* Generated By: uToolsPlugin SqlConvert
* Lesscoding Generate Service
* @version: 0.0.5
* Link to: <a href="https://lesscoding.net">https://lesscoding.net</a>
* mail to:2496290990@qq.com
*/
public interface <%= table.className %>Mapper extends BaseMapper<<%= table.className %>> {

    /**
    * 分页查询
    * @param page  分页查询
    * @param <%= table.firstLowerClassName %> 查询条件
    * @return List 查询结果
    */
    <% if(config.page === 'mybatisPage') {%>
    List<<%= table.className %>> getPageByLike(IPage page,@Param("dto") <%= table.className %> <%= table.firstLowerClassName %>);
    <%}%>
    <% if(config.page === 'pageHelper') {%>
    List<<%= table.className %>> getPageByLike(<%= table.className %> <%= table.firstLowerClassName %>);
    <%}%>
    /**
    * 批量插入
    * @param list  批量插入的数据
    * @return int  影响行数
    */
    int insertBatch(@Param("list")List<<%= table.className %>> list);

    /**
    * 批量更新
    * @param list  批量更新的数据
    * @return int  影响行数
    */
    int updateBatch(@Param("list")List<<%= table.className %>> list);
}
